<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>景点推荐网</title>

<meta content="绿城之都-南宁" name="keywords" />

<meta content="绿城之都-南宁" name="description" />

<link href="../css/base.css" rel="stylesheet" type="text/css">

<link href="../css/pagename.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>


</head>



<body>



<!--header-->

<div class="header"> 

	<div class="w1000">

    	<p>你好，欢迎光临景点推荐网！</p>

        <div class="contact"><a href="../index.html">设为首页</a> <a href="../index.html">加入收藏</a></div>

	</div>

</div>





<div class="w1000">

	<div class="header_bottom">

			<a href="../index.html"><img src="../images/logo.jpg" width="294" height="49" alt="" title="绿城之都-南宁"></a>

       		<ul>

            	<li><a href="../index.html">网站首页</a></li>            
                  <li><a href="new.html">动态</a></li>
                <li><a href="leave.html">留言</a></li>  

				 <li><a href="about.html">团队介绍</a></li>       

                <li><a href="connection.html">联系我们</a></li>

     		</ul>  

    </div>       

</div>
<!--header结束--> 

<div class="container"> 		

		<!--banner开始-->

		<div class="banner_erji">

        	<img src="../images/banner_erji.jpg" width="1000" height="187" alt="" title="">

        </div>

		<!--banner结束--> 

		

		<!--content开始-->

		<div class="content clearfix">

        	<div class="leftbar">

            	<div class="leftnav">

                	<h1>栏目</h1>

                	<ul class="ul_left">

                    

                    

        <li><h3><a href="introduce.html" id="jianjie">南宁简介</a></h3>

</li>

        

        <li><h3><a href="Culture.html" id="wenhua">南宁文化</a></h3>

</li>

        

        <li><h3><a href="historic.html" id="lishi">南宁历史</a></h3>
		
</li>
<li><h3><a href="techang.html" id="techang">南宁历史</a></h3>
		
</li>

         	</ul>

                 
                </div>

                <div class="left_lx">

                	<h1>联系方式</h1>

                    <p>地址：XXXX</p>

                      <p>联系人：XXXX</p>

                      <p>电话：0771-xxxxxxx</p>

                      <p>QQ：9XXX5</p>

                      <p>网址：wwXXXcom</p>

                      <p>邮编：530001</p>

                </div>

            </div>

        	<div class="rightbar">

            	<div class="bread"><a href="../index.html">首页</a>><span id="zhuyao">南宁文化</span></div>

                

            	<div class="con_news">

                	<p class="p_tit2">

                    	<span id="jianjie1">南宁文化</span>

                        发布人:管理员　　发布时间：2016-07-2 23:25:28

                  </p>

                	<div class="con">

               		   <p>

	<p id="neirong">

		&nbsp;&nbsp;&nbsp;&nbsp;南宁又称绿城。有东盟博览会，有民歌节。美丽的南方城市。
<br />

&nbsp;&nbsp;&nbsp;&nbsp;南宁，是一座历史悠久的边陲古城，具有深厚的文化积淀，古称邕州，是一个民族欢乐、活力动感的文化之城。南宁以壮族为主，居住着壮、汉、苗、瑶等36个少数民族，总人口为666.16万，各族人民和睦相处，民族文化缤纷灿烂，民俗活动多姿多彩。抛绣球、赛龙舟、板鞋舞、抢花炮、踩风车等各种民俗活动精彩纷呈。南宁是一座充满歌声的城市，每年一届的南宁国际民歌艺术节是世界民族艺术交流的盛会，热情的壮乡儿女与中外艺术家欢聚一堂，以歌会友、以歌传情，充分展示歌的海洋，舞的故乡的无限魅力。

<br />

&nbsp;&nbsp;&nbsp;&nbsp;南宁别称绿城、凤凰城、五象城。旅游资源丰富，北连桂林，南接北海，构成了广西的黄金旅游带。壮丽的边关风采、浪漫的海滩风貌、迷人的异国情调，星罗棋布的灵山秀水，古朴悠远的古迹故址，山、水、人、情构成南宁多层次的旅游景观。

<br />

&nbsp;&nbsp;&nbsp;&nbsp;南宁城区人通用南宁白话（粤语方言之一），郊区部分使用平话（汉语方言之一)，壮族使用壮语（分别属于南部方言邕南土语和北部方言邕北土语）。整个南宁市最通行的是南宁白话以及混杂粤语元素的普通话，各族人民大部分能使用普通话。

 <br />

	</p>

	<p>

		<br />

	</p>

                    </div>
<!-- 点赞加评论 -->
                  <div align="right">
                  <img alt="" src="../images/meidianzan.jpg" width="20" height="20" id="dianzan"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <b>发表评论:</b>&nbsp;&nbsp;<input type="text" size="50px" id="pinglun"></input>
                     <button id="fasong">发送</button>
                  </div>
                  <br/>
                  <div id="allpinglun">
                      
                  </div>
              

                           
            </div>
        </div>
		<!--content结束--> 
</div>

<!--footer开始-->

<div class="footer"> 

	<p><a href="../index.html">首页</a> | <a href="historic.html">历史</a> | <a href="beautiful.html">风景</a> | <a href="tourism.html">旅游</a> | <a href="delicacy.html">美食</a> | <a href="new.html">动态</a> | <a href="leave.html">旅游</a>| <a href="connection.html">联系我们</a></p>

<p>Copyright &copy; 2015－2016 All Rights Reserved 版权所有 XXXXXXXXXXXXXXXXXX</p>
  <p>地址：XXXXXXXXXXXXXXXXXX </p>
</div>



<!--footer 结束--> 
  <script src="../js/main.js"></script>
     <script>
      $(function(){
     	  var url = window.location.href;
    	  var id = getUrlParam(url,"id");
    	  $.ajax({
	  		  url:'/lvyou/SelOneByIdServlet',
	  		  type:'post',
	  		  data:'id='+id,
	  		  success:function(data){
	  			console.log(JSON.parse(data));
	  			if(JSON.parse(data).code==100){
	  				var jingdian = JSON.parse(data).extend.jingdian;
             		$("#jianjie").text(jingdian.name+"简介");
             		$("#lishi").text(jingdian.name+"历史");
             		$("#wenhua").text(jingdian.name+"文化");
             		$("#techang").text(jingdian.name+"特产");
             		$("#jianjie1").text(jingdian.name+"文化");
             		$("#zhuyao").text(jingdian.name+"文化");
             		var dizhi1 = "introduce.html?id="+jingdian.id;   //简介
             		var dizhi2 = "Culture.html?id="+jingdian.id;     //文化
             		var dizhi3 = "historic.html?id="+jingdian.id;    //历史
             		var dizhi4 = "techang.html?id="+jingdian.id;     //特产
             		$('#jianjie').attr('href',dizhi1);
             		$('#wenhua').attr('href',dizhi2);
             		$('#lishi').attr('href',dizhi3);
             		$('#techang').attr('href',dizhi4);
             		$('#neirong').text(jingdian.wenhua);
             	}else {
             	    				  
             	}
	  		  }
	  	  });
    	  isdianzan();
    	  selpinglun();
      });
      
      //获取url地址上参数
      function getUrlParam(url,name){
             var pattern = new RegExp("[?&]" + name +"\=([^&]+)","g");
             var matcher = pattern.exec(url);
             var items = null;
             if(matcher != null){
                  try{
                      items = decodeURIComponent(decodeURIComponent(matcher[1]));   
                  }catch(e){
                      try{
                          items = decodeURIComponent(matcher[1]);
                  }catch(e){
                          items = matcher[1];
                       }
                  }
              }
              return items;
        }
      
      
      
      //查询是否点赞 
      function isdianzan(){
    	  var url = window.location.href;
  	      var jingdianId = getUrlParam(url,"id");
  	      var userId = localStorage.getItem("userId");
  	      $.ajax({
	  		  url:'/lvyou/IsdianzanServlet',
	  		  type:'post',
	  		  data:'userId='+userId+"&jingdianId="+jingdianId,
	  		  success:function(data){
	  			console.log(JSON.parse(data));
	  			if(JSON.parse(data).code==100){
	  				 if(JSON.parse(data).extend.isdianzan){
	  					document.getElementById("dianzan").src="../images/yidianzan.jpg";
	  					$("#dianzan").attr("alt",1);
	  				 }else{
	  					document.getElementById("dianzan").src="../images/meidianzan.jpg";
	  					$("#dianzan").attr("alt",0);
	  				 }
           	}else{
           	    				  
           	}
	  		  }
	  	  });
      }
      
      $("#dianzan").click(function(){
      	dianzan()
      });
      
      //点赞 
      function dianzan(){
      	
      	  var isdianzan = $("#dianzan").attr("alt");
      	//  alert(isdianzan);
      	  if(isdianzan==1){
      		  showMessage('您已经点赞','success',1000)
      		  return;
      	  }
      	  var url = window.location.href;
      	  var jingdianId = getUrlParam(url,"id");
      	  var userId = localStorage.getItem("userId");
      	  if(userId==null){
    		 window.location.href="../login.html"; 
    	  }
      	  $.ajax({
  	  		  url:'/lvyou/DianzanServlet',
  	  		  type:'post',
  	  		  data:'userId='+userId+"&jingdianId="+jingdianId,
  	  		  success:function(data){
  	  			console.log(JSON.parse(data));
  	  			if(JSON.parse(data).code==100){
  	  				document.getElementById("dianzan").src="../images/yidianzan.jpg";
	  					$("#dianzan").attr("alt","yes");
               	}else{
               	    				  
               	}
  	  		  }
  	  	  });
      }
      
      $("#fasong").click(function(){
      	fabupinglun()
      });
      //发布评论 
      function fabupinglun(){
       	  var url = window.location.href;
      	  var jingdianId = getUrlParam(url,"id");
      	  var userId = localStorage.getItem("userId");
      	  if(userId==null){
    		  window.location.href="../login.html"; 
    	  }
      	  var details = $('#pinglun').val();
      	  $.ajax({
  	  		  url:'/lvyou/AddpinglunServlet',
  	  		  type:'post',
  	  		  data:'userId='+userId+"&jingdianId="+jingdianId+"&details="+details,
  	  		  success:function(data){
  	  			console.log(JSON.parse(data));
  	  			if(JSON.parse(data).code==100){
  	  				showMessage('发送成功','success',1000)
  	  			    location.reload();
               	}else{
               		showMessage('发送失败','error',1000)				  
               	}
  	  		  }
  	  	  });
      }
      
      //查询所有评论
      function selpinglun(){
       	  var url = window.location.href;
      	  var jingdianId = getUrlParam(url,"id");
      	  var userId = localStorage.getItem("userId");
        	  if(userId==null){
      		  window.location.href="../login.html"; 
      	  }
      	  $.ajax({
  	  		  url:'/lvyou/AllpinglunServlet',
  	  		  type:'post',
  	  		  data:"id="+jingdianId,
  	  		  success:function(data){
  	  			console.log(JSON.parse(data));
  	  			if(JSON.parse(data).code==100){
  	  				$.each(JSON.parse(data).extend.list,function(i,item){
  	  					var p = $("<p></p>");
     	  				    p.append(item.username+"在"+item.time+"评论："+item.details);
     	  				    $("#allpinglun").append(p);
     	  				    
  	  				});
               	}else{
               					  
               	}
  	  		  }
  	  	  });
      }
    </script>
</body>

</html>

